<template>
  <div class="my-images">
    <div class="list">
      <my-image
          v-for="(item,index) in imageList"
          :key="index"
          :width="width" :height="height"
          :src="$getImgUrl(item)"
          :is-preview="false"
          @click.native="$refs.imageViewer.open(index)"
      />
    </div>
    <my-image-viewer ref="imageViewer" :list="imageList"/>
  </div>
</template>

<script>
  import MyImageViewer from '@/components/MyImageViewer'

  export default {
    components: {
      MyImageViewer
    },
    props: {
      imageList: {
        type: Array,
        default: function() {
          return []
        }
      },
      width: {
        type: String,
        default: 'auto'
      },
      height: {
        type: String,
        default: 'auto'
      }
    },
    data() {
      return {}
    },
    methods: {},
    mounted() {
    }
  }
</script>

<style scoped>

</style>
